import {createStore} from 'redux'
interface IState{
  list:object
}
let Initstate = {
    list:[],
    user:[
        {
            "userName":"aaa",
            "passWord":111
        },  {
            "userName":"bbb",
            "passWord":222
        },  {
            "userName":"ccc",
            "passWord":333
        }
    ]
}
function reducer(state:any=Initstate,action:any){
    state=JSON.parse(JSON.stringify(state))
    switch (action.type){
        case 'GET_DATA':
            state.list=action.data
            return state
        default:
            return state
    }
}
const store = createStore(reducer)
export default store